<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="areainsights_v1.html">Places Aggregate API</a> . <a href="areainsights_v1.v1.html">v1</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#computeInsights">computeInsights(body=None, x__xgafv=None)</a></code></p>
<p class="firstline">This method lets you retrieve insights about areas using a variety of filter such as: area, place type, operating status, price level and ratings. Currently "count" and "places" insights are supported. With "count" insights you can answer questions such as "How many restaurant are located in California that are operational, are inexpensive and have an average rating of at least 4 stars" (see `insight` enum for more details). With "places" insights, you can determine which places match the requested filter. Clients can then use those place resource names to fetch more details about each individual place using the Places API.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="computeInsights">computeInsights(body=None, x__xgafv=None)</code>
  <pre>This method lets you retrieve insights about areas using a variety of filter such as: area, place type, operating status, price level and ratings. Currently &quot;count&quot; and &quot;places&quot; insights are supported. With &quot;count&quot; insights you can answer questions such as &quot;How many restaurant are located in California that are operational, are inexpensive and have an average rating of at least 4 stars&quot; (see `insight` enum for more details). With &quot;places&quot; insights, you can determine which places match the requested filter. Clients can then use those place resource names to fetch more details about each individual place using the Places API.

Args:
  body: object, The request body.
    The object takes the form of:

{ # Request for the ComputeInsights RPC.
  &quot;filter&quot;: { # Filters for the ComputeInsights RPC. # Required. Insight filter.
    &quot;locationFilter&quot;: { # Location filters. Specifies the area of interest for the insight. # Required. Restricts results to places which are located in the area specified by location filters.
      &quot;circle&quot;: { # A circle is defined by a center point and radius in meters. # Area as a circle.
        &quot;latLng&quot;: { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # The latitude and longitude of the center of the circle.
          &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
          &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
        },
        &quot;place&quot;: &quot;A String&quot;, # **Format:** Must be in the format `places/PLACE_ID`, where `PLACE_ID` is the unique identifier of a place. For example: `places/ChIJgUbEo8cfqokR5lP9_Wh_DaM`.
        &quot;radius&quot;: 42, # Optional. The radius of the circle in meters
      },
      &quot;customArea&quot;: { # Custom Area. # Custom area specified by a polygon.
        &quot;polygon&quot;: { # A polygon is represented by a series of connected coordinates in an counterclockwise ordered sequence. The coordinates form a closed loop and define a filled region. The first and last coordinates are equivalent, and they must contain identical values. The format is a simplified version of GeoJSON polygons (we only support one counterclockwise exterior ring). # Required. The custom area represented as a polygon
          &quot;coordinates&quot;: [ # Optional. The coordinates that define the polygon.
            { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.
              &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
              &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
            },
          ],
        },
      },
      &quot;region&quot;: { # A region is a geographic boundary such as: cities, postal codes, counties, states, etc. # Area as region.
        &quot;place&quot;: &quot;A String&quot;, # The [place ID](https://developers.google.com/maps/documentation/places/web-service/place-id) of the geographic region. Not all region types are supported; see documentation for details. **Format:** Must be in the format `places/PLACE_ID`, where `PLACE_ID` is the unique identifier of a place. For example: `places/ChIJPV4oX_65j4ARVW8IJ6IJUYs`.
      },
    },
    &quot;operatingStatus&quot;: [ # Optional. Restricts results to places whose operating status is included on this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is used as default.
      &quot;A String&quot;,
    ],
    &quot;priceLevels&quot;: [ # Optional. Restricts results to places whose price level is included on this list. If `price_levels` is not set, all price levels are included in the results.
      &quot;A String&quot;,
    ],
    &quot;ratingFilter&quot;: { # Average user rating filters. # Optional. Restricts results to places whose average user ratings are in the range specified by rating_filter. If rating_filter is not set, all ratings are included in the result.
      &quot;maxRating&quot;: 3.14, # Optional. Restricts results to places whose average user rating is strictly less than or equal to max_rating. Values must be between 1.0 and 5.0.
      &quot;minRating&quot;: 3.14, # Optional. Restricts results to places whose average user rating is greater than or equal to min_rating. Values must be between 1.0 and 5.0.
    },
    &quot;typeFilter&quot;: { # Place type filters. Only Place types from [Table a](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) are supported. A place can only have a single primary type associated with it. For example, the primary type might be &quot;mexican_restaurant&quot; or &quot;steak_house&quot;. Use included_primary_types and excluded_primary_types to filter the results on a place&#x27;s primary type. A place can also have multiple type values associated with it. For example a restaurant might have the following types: &quot;seafood_restaurant&quot;, &quot;restaurant&quot;, &quot;food&quot;, &quot;point_of_interest&quot;, &quot;establishment&quot;. Use included_types and excluded_types to filter the results on the list of types associated with a place. If a search is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if you specify {&quot;included_types&quot;: [&quot;restaurant&quot;], &quot;excluded_primary_types&quot;: [&quot;steak_house&quot;]}, the returned places provide &quot;restaurant&quot; related services but do not operate primarily as a &quot;steak_house&quot;. If there are any conflicting types, i.e. a type appears in both included_types and excluded_types types or included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned. One of included_types or included_primary_types must be set. # Required. Place type filters.
      &quot;excludedPrimaryTypes&quot;: [ # Optional. Excluded primary Place types.
        &quot;A String&quot;,
      ],
      &quot;excludedTypes&quot;: [ # Optional. Excluded Place types.
        &quot;A String&quot;,
      ],
      &quot;includedPrimaryTypes&quot;: [ # Optional. Included primary Place types.
        &quot;A String&quot;,
      ],
      &quot;includedTypes&quot;: [ # Optional. Included Place types.
        &quot;A String&quot;,
      ],
    },
  },
  &quot;insights&quot;: [ # Required. Insights to compute. Currently only INSIGHT_COUNT and INSIGHT_PLACES are supported.
    &quot;A String&quot;,
  ],
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response for the ComputeInsights RPC.
  &quot;count&quot;: &quot;A String&quot;, # Result for Insights.INSIGHT_COUNT.
  &quot;placeInsights&quot;: [ # Result for Insights.INSIGHT_PLACES.
    { # Holds information about a place
      &quot;place&quot;: &quot;A String&quot;, # The unique identifier of the place. This resource name can be used to retrieve details about the place using the [Places API](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/get).
    },
  ],
}</pre>
</div>

</body></html>